﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for redirectLogin
/// </summary>
namespace Database
{

    public class checkLogin
    {
        public void redirectToLoginPage()
        {
            if (HttpContext.Current.Session["permission"] != null)
            {
                string permission = HttpContext.Current.Session["permission"].ToString();
                if (permission != "nhanvien")
                {
                    HttpContext.Current.Response.Redirect("~/admin/Login.aspx");
                }
            }
            HttpContext.Current.Response.Redirect("~/admin/Login.aspx");

        }
    }
}